import java.awt.Image;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JTextField;

public class EditFilmFrame extends JFrame{

    JLabel filmID = new JLabel( "Film ID" );
    static JTextField filmName = new JTextField();
    JButton bEditDetails = new JButton( "Edit Film Details" );
    JButton bEditReview = new JButton( "Edit Film Review" );

    EditFilmFrame(){
        Image bGround = ReadImage.getImage( "http://wallpapers.wallbase.cc/rozne/wallpaper-389121.jpg" );
        Browser bGPanel = new Browser( bGround );
        add(bGPanel);

        filmID.setBounds(50,50,100,20);
        filmName.setBounds(200,50,150,20);
        bEditDetails.setBounds(100,250,200,20);
        bEditReview.setBounds(400,250,200,20);

        bGPanel.add( filmID );
        bGPanel.add( filmName );
        bGPanel.add( bEditDetails );
        bGPanel.add( bEditReview );

        setSize(750,400);
        setVisible(true);
        clickEditDetails();
        clickEditReview();
    }

    public void clickEditDetails(){
        bEditDetails.addActionListener( new ActionListener() {
            public void actionPerformed( ActionEvent ae ){
                EditFilmDetailsFrame details = new EditFilmDetailsFrame( filmName.getText() );
            }
        });
    }

    public void clickEditReview(){
        bEditDetails.addActionListener( new ActionListener() {
            public void actionPerformed( ActionEvent ae ){
                EditFilmReviewsFrame details = new EditFilmReviewsFrame( filmName.getText() );
            }
        });
    }
}

